package com.xwdeshj.entity;

import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * 农家乐——农家住宿信息
 */
@Entity(name = "xw_farm_roominfo")
public class XwFarmRoominfo {

    /**
     * 农家住宿id
     */
    @Column(name = "farm_room_id")
    private Integer farmRoomId;

    /**
     * 商家加密id
     */
    @Column(name = "business_encryptId")
    private String businessEncryptid;

    /**
     * 农家乐加密id（店铺id）
     */
    @Column(name = "farm_encryptId")
    private String farmEncryptid;

    /**
     * 套餐类型(单人间，双人间……)
     */
    @Column(name = "farm_room_type")
    private String farmRoomType;

    /**
     * 房屋说明
     */
    @Column(name = "farm_room_desc")
    private String farmRoomDesc;

    /**
     * 单价(1间)(￥100X1)
     */
    @Column(name = "farm_room_price")
    private Double farmRoomPrice;

    /**
     * 数量
     */
    @Column(name = "farm_room_number")
    private Integer farmRoomNumber;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "farm_room_updatetime")
    private Date farmRoomUpdatetime;

    /**
     * 添加时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "farm_room_createtime")
    private Date farmRoomCreatetime;

    public XwFarmRoominfo(){

    }

    public XwFarmRoominfo(String businessEncryptid, String farmEncryptid, String farmRoomType, String farmRoomDesc, Double farmRoomPrice, Integer farmRoomNumber, Date farmRoomUpdatetime, Date farmRoomCreatetime) {
        this.businessEncryptid = businessEncryptid;
        this.farmEncryptid = farmEncryptid;
        this.farmRoomType = farmRoomType;
        this.farmRoomDesc = farmRoomDesc;
        this.farmRoomPrice = farmRoomPrice;
        this.farmRoomNumber = farmRoomNumber;
        this.farmRoomUpdatetime = farmRoomUpdatetime;
        this.farmRoomCreatetime = farmRoomCreatetime;
    }


    /**
     * 获取农家住宿id
     *
     * @return farm_room_id - 农家住宿id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getFarmRoomId() {
        return farmRoomId;
    }

    /**
     * 设置农家住宿id
     *
     * @param farmRoomId 农家住宿id
     */
    public void setFarmRoomId(Integer farmRoomId) {
        this.farmRoomId = farmRoomId;
    }

    /**
     * 获取商家加密id
     *
     * @return business_encryptId - 商家加密id
     */
    public String getBusinessEncryptid() {
        return businessEncryptid;
    }

    /**
     * 设置商家加密id
     *
     * @param businessEncryptid 商家加密id
     */
    public void setBusinessEncryptid(String businessEncryptid) {
        this.businessEncryptid = businessEncryptid;
    }

    /**
     * 获取套餐类型(单人间，双人间……)
     *
     * @return farm_room_type - 套餐类型(单人间，双人间……)
     */
    public String getFarmRoomType() {
        return farmRoomType;
    }

    /**
     * 设置套餐类型(单人间，双人间……)
     *
     * @param farmRoomType 套餐类型(单人间，双人间……)
     */
    public void setFarmRoomType(String farmRoomType) {
        this.farmRoomType = farmRoomType;
    }

    /**
     * 获取房屋说明
     *
     * @return farm_room_desc - 房屋说明
     */
    public String getFarmRoomDesc() {
        return farmRoomDesc;
    }

    /**
     * 设置房屋说明
     *
     * @param farmRoomDesc 房屋说明
     */
    public void setFarmRoomDesc(String farmRoomDesc) {
        this.farmRoomDesc = farmRoomDesc;
    }

    /**
     * 获取单价(1间)(￥100X1)
     *
     * @return farm_room_price - 单价(1间)(￥100X1)
     */
    public Double getFarmRoomPrice() {
        return farmRoomPrice;
    }

    /**
     * 设置单价(1间)(￥100X1)
     *
     * @param farmRoomPrice 单价(1间)(￥100X1)
     */
    public void setFarmRoomPrice(Double farmRoomPrice) {
        this.farmRoomPrice = farmRoomPrice;
    }

    /**
     * 获取数量
     *
     * @return farm_room_number - 数量
     */
    public Integer getFarmRoomNumber() {
        return farmRoomNumber;
    }

    /**
     * 设置数量
     *
     * @param farmRoomNumber 数量
     */
    public void setFarmRoomNumber(Integer farmRoomNumber) {
        this.farmRoomNumber = farmRoomNumber;
    }


    public String getFarmEncryptid() {
        return farmEncryptid;
    }

    public void setFarmEncryptid(String farmEncryptid) {
        this.farmEncryptid = farmEncryptid;
    }

    public Date getFarmRoomUpdatetime() {
        return farmRoomUpdatetime;
    }

    public void setFarmRoomUpdatetime(Date farmRoomUpdatetime) {
        this.farmRoomUpdatetime = farmRoomUpdatetime;
    }

    public Date getFarmRoomCreatetime() {
        return farmRoomCreatetime;
    }

    public void setFarmRoomCreatetime(Date farmRoomCreatetime) {
        this.farmRoomCreatetime = farmRoomCreatetime;
    }

    @Override
    public String toString() {
        return "XwFarmRoominfo{" +
                "farmRoomId=" + farmRoomId +
                ", businessEncryptid='" + businessEncryptid + '\'' +
                ", farmEncryptid='" + farmEncryptid + '\'' +
                ", farmRoomType='" + farmRoomType + '\'' +
                ", farmRoomDesc='" + farmRoomDesc + '\'' +
                ", farmRoomPrice=" + farmRoomPrice +
                ", farmRoomNumber=" + farmRoomNumber +
                ", farmRoomUpdatetime=" + farmRoomUpdatetime +
                ", farmRoomCreatetime=" + farmRoomCreatetime +
                '}';
    }
}